Using JBuilder for StarTeam JavaBeans

While you can use any full featured Java development environment with StarTeam Extensions, the samples included were created with JBuilder Enterprise Edition. These samples may also be maintained with later releases of JBuilder.

To use the StarTeam JavaBeans in JBuilder you must configure your libraries and palette.

Configuring JBuilder to use StarTeam JavaBeans

To configure JBuilder for JavaBeans, do the following:

  1. Configure the JBuilder libraries to include the starflow-extensions.jar, starteamxx.jar and guicomponents.jar files. User Home should now have subfolders named StarTeam Extensions, StarTeam, and GUI SDK.

    1. Click Tools > Configure Libraries from JBuilder’s menu bar.
    2. Select the User Home folder from the Configure Libraries dialog box.
    3. Click New to create a StarTeam Extensions folder under the User Home folder that contains the starflow-extensions.jar and guicomponents.jar files. If you have a StarFlow folder under the User Home folder, you need to change it.
    4. Enter StarTeam Extensions in the Name field in the New Library Wizard dialog box.
    5. Click Add.
    6. On the Select One or More Directories dialog, select the starflowextensions.jar and guicomponents.jar files from the StarFlowExtensions\Projects folder at C:\config_name\StarFlow Extensions\Projects.
    7. Click OK until you return to the Configure Libraries dialog box.
    8. Click Add.
    9. Select the User Home folder from the Configure Libraries dialog box.
    10. Click New to create a StarTeam folder under the User Home folder that contains the starteamxx.jar file. If you have a StarGate folder under the User Home folder, you need to change it.
    11. Enter StarTeam in the Name field in the New Library Wizard dialog box.
    12. Click Add.
    13. On the Select One or More Directories dialog box, select the starteamxx.jar file (usually located at C:\Program Files\Micro Focus\ StarTeam SDK x.x\Lib\starteamxx.jar).
    14. Click OK until you return to the Configure Libraries dialog box.
    15. Select the User Home folder from the Configure Libraries dialog box.
    16. Click New to create a GUI SDK folder under the User Home folder that contains the starteam-gui.jar file.
    17. Enter GUI SDK in the Name field on the New Library Wizard dialog.
    18. Click Add.
    19. On the Select One or More Directories dialog, select the starteamgui.jar file from the StarFlowExtensions\Projects folder (for example, at C:\config_name\StarFlow Extensions\Projects).
    20. Click OK until you return to the Configure Libraries dialog box.

    User Home should now have subfolders named StarTeam Extensions, StarTeam, and GUI SDK.

  2. Add a new palette by choosing Tools > Configure Palette from JBuilder’s menu bar.

    1. Click Add in the Palette Properties dialog box.
    2. On the Add Page dialog box, enter StarTeam Extensions.
    3. Click OK.
    4. Select StarTeam Extensions.
    5. Click Move Up until StarTeam Extensions is at the top of the list in this tab.
    6. Click the Add Components tab.
    7. Click Select Library.
    8. From the Select a Different Library dialog box, select the StarTeam Extensions library.
    9. Click OK.
    10. From the Palette Page list, select the StarTeam Extensions palette page.
    11. Click Add From Selected Library at the bottom of the dialog. As the JavaBeans are added, they are listed in the Results dialog box.
    12. Click OK, and you are ready to use the StarTeam JavaBean components.
  3. In JBuilder, open a sample project to be modified for use with StarTeam.
  4. Double-click the .java file to be modified.
  5. Click the Design tab. The StarTeam Extensions JavaBeans should appear on the StarTeam Extensions page of the toolbar.

Back to top

Using JBuilder Personal Edition

JBuilder Personal does not include IDE-based support for building Jar files. Building the Jar file is a necessary step for use as an APE. For your convenience, we have included MakeitemtypeJar.bat in the base of each respective sample project. After you have compiled the project in JBuilder, you can run the batch file to create the Jar file, which will be placed in the Projects folder by default, where it will be ready for check in to the StarFlow Extensions project in the Projects folder. You may need to edit the batch file if JBuilder is not installed in the C:\jbuilderx folder.

Back to top

Editing StarTeam APEs

You can add new fields to or edit the existing fields of a StarTeam Extensions form using your favorite Java development tool. These forms are called alternate property editors (APEs). When you use a StarTeam JavaBean component, you will need to select the correct component that matches the type of field you are using, and after the component is placed on the form, you will need to set the propertyName attribute. The propertyName attribute should have the application field name that you wish to display in this component in the form.

In design mode the label on the field will be the value found in the propertyName attribute of the JavaBean, but when executed the label will be the StarTeam Display Name for the field.

Where applicable, the JavaBeans are composed of an editor component and a text label showing the name of the property being edited. By default, the text shown by the label is the display name of the StarTeam property associated with the JavaBean (set via the propertyName JavaBean property). When you edit the JavaBean in a visual form designer such as JBuilder, the label's text will be the internal identifier for the property, that is, the value of the propertyName property of the JavaBean. When the form is run, that text is replaced with the display name of the property (defined by StarTeam metadata about the property). For example, the StarTeam Status field has the same display name and internal identifier. However, the custom status field used in the change request samples has the display name Workflow Status and the internal identifier Usr_StarFlowStatus. In the latter case, you see Usr_StarFlowStatus in JBuilder and Workflow Status when the form runs.

You can control the behavior of this label by doing any of the following:

Supplying alternate text for the label Set the labelTextOverride property of the JavaBean. The text you supply will be seen in JBuilder and when the form runs.
Turning the label off so that it is not seen at any time Set the showLabel property to false. To turn the label back on later, you would set the showLabel property to true.

Back to top